package com.example.chat.common.base;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

public class PageData<T> implements Serializable {
    @Serial
    private static final long serialVersionUID = -4492486757800885124L;

    private Integer page = PageQueryVO.DEFAULT_PAGE_INDEX;

    private Integer pageSize = PageQueryVO.DEFAULT_PAGE_SIZE;

    private Long totalCount = 0L;

    private List<T> list;

    public PageData(){

    }

    public PageData(Long totalCount, List<T> list){
        this.totalCount = totalCount;
        this.list = list;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Long getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Long totalCount) {
        this.totalCount = totalCount;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }
}
